package com.shanpin.shebao.admin.wage.model;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.shanpin.core.utils.DateUtil;
import com.shanpin.core.utils.JsonUtil;
import com.shanpin.shebao.model.report.WageItemData;

public class TWageMonth {
	
	/** 操作月份 */
	private int opt_month;
	/** 所有支付过的数据 */
	private WageItemData totals;
	/** 当前处于已支付状态的数据情况 */
	private WageItemData payed;
	/** 当前处于已返还状态数据的情况 */
	private WageItemData hfed;
	/** 当前处于返还失败状态数据的情况 */
	private WageItemData fail;
	/**  */
	private String gen_time;

	public static RowMapper<TWageMonth> mapper = new RowMapper<TWageMonth>() {

		@Override
		public TWageMonth mapRow(ResultSet rs, int rowNum) throws SQLException {
			TWageMonth pojo = new TWageMonth();
			pojo.opt_month = rs.getInt("opt_month");
			pojo.totals = JsonUtil.toT(rs.getString("totals"), WageItemData.class);
			pojo.payed = JsonUtil.toT(rs.getString("payed"), WageItemData.class);
			pojo.hfed = JsonUtil.toT(rs.getString("hfed"), WageItemData.class);
			pojo.fail = JsonUtil.toT(rs.getString("fail"), WageItemData.class);
			pojo.gen_time = DateUtil.dateStr(rs.getTimestamp("gen_time"));
			return pojo;
		}
	};

	public int getOpt_month() {
		return opt_month;
	}

	public WageItemData getTotals() {
		return totals;
	}

	public WageItemData getPayed() {
		return payed;
	}

	public WageItemData getHfed() {
		return hfed;
	}

	public WageItemData getFail() {
		return fail;
	}

	public String getGen_time() {
		return gen_time;
	}


}
